import 'package:hari_curly/src/common/style.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/material.dart';

class BeginnerTutorial extends StatelessWidget {
  BeginnerTutorial({super.key});

  final List<Map<String, String>> data = [
    {'title': 'beginner_tutorial'.tr(), 'img': 'assets/img/swiper/3.jpg'},
  ];

  @override
  Widget build(BuildContext context) {
    return Container(
      width: MediaQuery.of(context).size.width,
      height: 280,
      margin: EdgeInsets.symmetric(vertical: 5, horizontal: 0),
      child: Padding(
          padding: EdgeInsets.symmetric(vertical: 0, horizontal: 4),
          child: Card(
              elevation: 0,
              color: pageBgColor,
              child: Column(children: [
                Container(
                  alignment: Alignment.topLeft,
                  padding: EdgeInsets.all(8),
                  margin: EdgeInsets.fromLTRB(0, 0, 0, 6),
                  child: Text(
                    'beginner_tutorial'.tr(),
                    style: TextStyle(fontSize: 16),
                  ),
                ),
                Expanded(
                  child: Container(
                    padding: EdgeInsets.symmetric(vertical: 0, horizontal: 8),
                      child: ListView(
                        scrollDirection: Axis.horizontal,
                        children: data
                            .map((item) =>
                            Container(
                                  margin: EdgeInsets.fromLTRB(0,0,24,0),
                                  child: Column(
                                    children: [
                                      Ink.image(
                                        width: 400,
                                        height: 200,
                                        image: AssetImage(item['img']!),
                                        fit: BoxFit.cover,
                                        child: InkWell(
                                          onTap: () {
                                            print('点击了图片');
                                          },
                                        ),
                                      ),
                                      SizedBox(width: 8,height: 4,),
                                      Text(item['title']!),
                                    ],
                                  ),
                                ))
                            .toList(),
                      )),
                )
              ]))),
    );
  }
}
